Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

50
Views
TypeError: (0, _$$_REQUIRE(_dependencyMap[0], "redux").createStore) is not a function react-native

I'm new in redux I'm trying to connect redux with react native when I set all and In App.js i add <provider store={store}> it display me that error: TypeError: (0, _$$_REQUIRE(_dependencyMap[0], "redux").createStore) is not a function.

App.js

import { Counter } from './assets/counter';
import { Provider } from 'react-redux';
import {store} from './assets/store/store'
const App= (props) => {
  return (
    <View style={{flex:1}}>
      <Provider store={store} >
        <Counter/>
      </Provider>
    </View>
  );
};


export default App;

cunter.js

export const Counter = (props) =>{
    return(
        <View style={{flex:1,justifyContent:'center', alignItems:'center'}} >
            <Button title="Add Inc"  />
            <Text>Counter</Text>
            <Button title="Add Dec"  />
        </View>
    )
}

store.js

import {createStore} from 'redux'
import {mainReducer} from './reducers'


export const store = createStore(mainReducer)

reducer.js

import {ADDITION, SUBTRACTION} from './actionType'

const initialState = {
    counter:0
}

export const mainReducer=(state=initialState, action)=>{
    switch (action.type) {
        case ADDITION:
            return {...state, counter:state.counter+1}
        case SUBTRACTION:
            return {...state, counter:state.counter-1}
    
        default:
            return state
    }
}

package.json

  "dependencies": {
    "react": "17.0.1",
    "react-native": "0.64.2",
    "react-redux": "^7.2.4",
    "redux": "^4.1.1"
  },
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

i have same problem but its solved and i just want to share.. its all happen because "npx react-native init Redux" well i try to create another react-native init with different name and move all folder from old one that i named it "Redux" then its all running normal.. so do not try to create folder or event project name with same modul thats we installed via NPM.. hope its help and enjoy your day.. thank you..

about 4 years ago · Juan Pablo Isaza Report

0

For anyone running into a similar issue - I fixed this by removing a dependancy cycle in my import statements.

E.g. A imports from B imports from A.

I had to move the function I was importing from A into file B (so B did not import from A).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!